#include "stc12c5a60s2.h"

void PCA_Init(void)
{
	CCON=0;
	CMOD=0x00;
	CL=0x00;
	CH=0x00;
	
	CCAPM0=0x42;
	CCAP0H=0xc0;
	CCAP0L=0xC0;
	
	CCAPM1=0X42;
	CCAP1H=0X40;
	CCAP1L=0X40;
	
	CR=1;
	

}

void PWM_Set0(unsigned char Duty)            //P13
{
	CCAP0H=Duty;
	CCAP0L=Duty;

	
}
void PWM_Set1(unsigned char Duty)              //P14
{
	CCAP1H=Duty;
	CCAP1L=Duty;
}